package jlu.zqq.tool;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import jlu.zqq.po.GsmRPic;

public class SqlConvertUtil {
	
	public final static List<GsmRPic> ResultSetToList(ResultSet rs){
		List<GsmRPic> list = new ArrayList<GsmRPic>();
		try {
			while(rs.next()){
				GsmRPic pic = new GsmRPic();
				pic.setName(rs.getString("name"));
				pic.setMs(rs.getString("ms"));
				pic.setType(rs.getInt("type"));
				pic.setPic(rs.getBytes("pic"));
				System.out.println(pic);
				(list).add(pic);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return extracted(list);
	}

	private static List<GsmRPic> extracted(List<GsmRPic> list) {
		return list;
	}
}
